<!DOCTYPE html >
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="base :: header (title='发料')" />
<link th:href="@{plugins/common/css/basemessage.css}" rel="stylesheet" />
<link th:href="@{plugins/bootstrapEditable/css/bootstrap-editable-1.5.1.css}" rel="stylesheet" />
<link th:href="@{css/WareHouse/picking.css}" rel="stylesheet" />
<body class="">
	<div class="main-content blank_bg">
		<div>
			<div>
				<div class="row" style="">
					<div class="">
						<!-- <div class="div_bg">
							<div style="float:left;margin-left: 5px;">
								<span class="spanCss">派工单号：</span> 
								<input type="text" id="fBillNo" name="fBillNo" class="form-control clean_C" style="width: 140px; margin-right: 10px;" /> 
							</div>
							<div style="float:left">
								<button id="query" class="btn btn-default " type="button" style="margin-left: 10px;">查询</button>
								<button type="button" class="btn btn-default " id="resetting">重置</button>
							</div>
							<div style="clear:both"></div>
						</div> -->
						
						<!-- 发料列表 start -->
						<div class="div_bg" style="margin-top: 10px;">
							<span style="margin-bottom: 10px;" class="titleX">一般发料</span>
							<div style="float: right;">
								<div style="float:left;margin-left: 5px;">
									<span class="spanCss">派工单号：</span> 
									<input type="text" id="fBillNo" name="fBillNo" class="form-control clean_C" style="width: 140px;" /> 
								</div>
								<div style="float:right">
									<button id="queryNoMerge" class="btn btn-default " type="button" style="margin-left: 10px;">查询</button>
									<button type="button" class="btn btn-default " id="resettingNoMerge">重置</button>
								</div>
								<div style="float: right;">
									<span class="spanCss" style="margin-left: 10px;">派工日期</span>
									<input type="text" id="startTime" name="startTime" class="date form-control clean_C" style="margin-left:5px;width: 85px;" autocomplete="off"/>
									<span>-</span>
									<input type="text" id="endTime" name="endTime" class="date form-control clean_C" style="margin-right: 10px;width: 85px;" autocomplete="off"/>
								</div>
								<div style="clear:both"></div>
							</div>
							<div style="">
								<table id="pickTable" class="table dataTable table-hover">
								</table>
							</div>
						</div>
						<!-- 发料列表 end -->
						
						<!-- 合并发料列表 start -->
						<div class="div_bg" style="margin-top: 10px;">
							<span style="margin-bottom: 10px;" class="titleX">合并发料</span>
							<div style="float: right;">
								<div style="float:left;margin-left: 5px;">
									<span class="spanCss">领料人卡号：</span> 
									<input type="text" id="fWorkerId" name="fWorkerId" class="form-control clean-C" style="width: 140px;" /> 
								</div>
								<div style="float:left;margin-left: 10px;">
									<span class="spanCss">领料单号：</span> 
									<input type="text" id="fBillNoM" name="fBillNoM" class="form-control clean-C" style="width: 140px;" /> 
								</div>
								<div style="float:left;margin-left: 10px;">
									<span class="spanCss">派工单号：</span> 
									<input type="text" id="fDisNo" name="fDisNo" class="form-control clean-C" style="width: 140px;" /> 
								</div>
								<div style="float: left;">
									<span class="spanCss" style="margin-left: 10px;">制单日期</span>
									<input type="text" id="beginTime" name="startTime" class="date form-control clean_C" style="margin-left:5px;width: 85px;" autocomplete="off"/>
									<span>-</span>
									<input type="text" id="finalTime" name="endTime" class="date form-control clean_C" style="margin-right: 10px;width: 85px;" autocomplete="off"/>
								</div>
								<div style="float:right">
									<button id="queryMerge" class="btn btn-default " type="button" style="margin-left: 10px;">查询</button>
									<button type="button" class="btn btn-default " id="resettingMerge">重置</button>
								</div>
								<div style="clear:both"></div>
							</div>
							<div style="">
								<table id="mergePickTable" class="table dataTable table-hover">
								</table>
							</div>
						</div>
						<!-- 发料列表 end -->
					</div>
					<!-- 发料模态框 start -->
					<div class="modal fade " id="pickingModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
						<div class="modal-dialog" style="width: 95%; height: 220px;">
							<div class="modal-content" style="width: auto;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="FLtitle"></h4>
								</div>
								<div class="modal-body" style="height: auto; padding: 10px;width: 100%;">
									<form id="pickingForm" class="form-group">
										<div style="display: inline-block;overflow: hidden;margin-right: 15px;width: 100%;" id="">
											<table border="0" cellspacing="0" cellpadding="0" class="table-condensed normal-table table-content" id="pickingTitle" style="display: none;width: 100%;">
												<tr>
													<td class="title"><span class="sub">派工单号：</span></td>
													<td>
														<input type="text" id="pickingfCode" name="fCode" class="clean_c form-control" readonly="readonly">
														<input type="hidden" id="" name="" class="clean_c form-control" readonly="readonly">
													</td>
													<td class="title"><span class="sub">产品名称：</span></td>
													<td><input type="text" id="pickingfName" name="FName" class="clean_c form-control" readonly="readonly"></td>
													<td class="title"><span class="sub">车间：</span></td>
													<td><input type="text" id="pickingfDepName" name="fDepName" class="clean_c form-control" readonly="readonly" style="width: 97%;"></td>
												</tr>
												<tr>
													<td class="title"><span class="sub">产品代码：</span></td>
													<td><input type="text" id="pickingfNumber" name="FNumber" class="clean_c form-control" readonly="readonly"></td>
													<td class="title"><span class="sub">规格型号：</span></td>
													<td><input type="text" id="pickingfModel" name="fModel" class="clean_c form-control" readonly="readonly"></td>
													<td class="title"><span class="sub">应发套数：</span></td>
													<td><input type="text" id="pickingfTargetQty" name="fTargetQty" class="clean_c form-control" readonly="readonly" style="width: 97%;"></td>
												</tr>
												<tr style="display: none;">
													<td class="title"><span class="sub"><span class="requiredCss">*</span>实发套数：</span></td>
													<td><input type="text" id="pickingfOutStockQty" name="fOutStockQty" class="clean_c form-control bj_color"  autocomplete="off" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" ></td>								
													<td class="title"><button type="button" class="btn btn-default" id="count" style="margin-left: 13px;">计算实发数</button></td>
												</tr>
											</table>
											<table border="0" cellspacing="0" cellpadding="0" class="table-condensed normal-table table-content" id="mergePickingTitle" style="display: none;width: 100%;">
												<tr>
													<td class="title"><span class="sub">领料单号：</span></td>
													<td><input type="text" id="pickingfBillNo" name="fBillNo" class="clean_c form-control" readonly="readonly"></td>
													<td class="title"><span class="sub">领料人：</span></td>
													<td><input type="text" id="pickingfWorker" name="fWorker" class="clean_c form-control" readonly="readonly" style="width: 97%;"></td>
													<td class="title"><span class="sub">领料车间：</span></td>
													<td><input type="text" id="pickingfDepName" name="fDepName" class="clean_c form-control" readonly="readonly"></td>
												</tr>
												<tr>
													<td class="title"><span class="sub">说明：</span></td>
													<td colspan="5"><input type="text" id="pickingfNote" name="fNote" class="clean_c form-control" readonly="readonly" style="width: 100%;"></td>
												</tr>
											</table>
											<table border="0" cellspacing="0" cellpadding="0" class="table-condensed normal-table table-content" id="" style="margin-bottom: 10px;width: 100%;">
												<tr>
													<td class="title"><span class="sub"><span class="requiredCss">*</span>仓库：</span></td>
													<td>
														<select name="fStockID" id="fStockID" class="selectpicker clean_C " data-live-search="true" data-width="168px">
														</select>
														<input type="hidden" id="pickingID" name="id" class="clean_c form-control" readonly="readonly">
													</td>
												</tr>
											</table>
											<div style="margin-top: 5px;margin-left: 15px;width: 98%">
												<!-- 发料明细列表 -->
												<table id="pickDatailsTable" class="table dataTable table-hover pickDatails">
												</table>
											</div>
											<div style="width: 100%;">
												<div>
													<span style="padding-left: 17px;" class="requiredCss" id="tipTitle"></span>
													<!-- <span style="padding-left: 17px;" class="requiredCss">注：带*为必填字段。</span> -->
													<!-- <span style="padding-left: 17px;" class="requiredCss">注：带*为必填字段。输入实发齐套数按回车后，实发数才会有数据。</span> -->
												</div>
												<div style="text-align: center;position: relative;">
													<button type="button" class="btn btn-default" id="print" style="margin-right: 20px;">打印</button>
													<button type="button" class="btn btn-default" id="confirm" style="margin-right: 20px;">确定</button>
													<button type="button" class="btn btn-default" id="cancel" data-dismiss="modal">取消</button>
												</div>
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
					<!-- 发料模态框 end -->
					
					<!-- 输入领料人卡号模态框 start -->
					<div class="modal fade " id="useModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
						<div class="modal-dialog" style="width: 530px; height: 220px;">
							<div class="modal-content" style="width: auto;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="titleModal">领料人</h4>
								</div>
								<div class="modal-body" style="height: auto; padding: 10px;">
									<div style="text-align: center;">
										<div>
											<span class="modalSpan">领料人卡号：</span>
											<input type="text" id="fWorker" name="fWorker" class="clean-c form-control bj_color resetting modalInput" autocomplete="off" />
										</div>
										<div style="margin: 10px;">
											<span class="modalSpan">领料人：</span>
											<input type="text" id="fWorkerName" name="fWorkerName" class="clean-c form-control resetting modalInput" readonly="readonly" />
										</div>
										<div style="margin-top: 10px;">
											<button id="save" class="btn btn-default" type="button" style="margin-right: 20px;">确定</button>
											<button id="back" class="btn btn-default" type="button" style="">取消</button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>	
					<!-- 输入质检人员卡号模态框 end -->
					
					<!-- 替换模态框 start -->
					<div class="modal fade " id="replaceModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
						<div class="modal-dialog" style="width: 95%; height: 220px;">
							<div class="modal-content" style="width: auto;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="">物料替换</h4>
								</div>
								<div class="modal-body" style="height: auto; padding: 10px;width: 100%;">
									<form id="replaceForm" class="form-group">
										<div style="display: inline-block;overflow: hidden;margin-right: 15px;width: 100%;" id="">
											<div style="margin-left: 15px;">
												<div style="float: left;margin-bottom: 5px;">
													<span class="spanCss">物料代码：</span> 
													<input type="text" id="replacefNumber" name="fNumber" class="form-control replace_clean" style="width: 120px;margin-right: 10px;" autocomplete="off" /> 
													<span class="spanCss">物料名称：</span> 
													<input type="text" id="replacefName" name="fName" class="form-control replace_clean" style="width: 120px;margin-right: 10px;" autocomplete="off" /> 
													<span class="spanCss">规格型号：</span> 
													<input type="text" id="replacefModel" name="fModel" class="form-control replace_clean" style="width: 120px;margin-right: 10px;" autocomplete="off" /> 
													<span class="spanCss">助记码：</span> 
													<input type="text" id="replacefHelpCode" name="fHelpCode" class="form-control replace_clean" style="width: 120px;margin-right: 10px;" autocomplete="off" /> 
												</div>
												<div style="float: left;margin-bottom: 5px;">
													<button id="replaceQuery" class="btn btn-default " type="button" style="margin-left: 10px;">查询</button>
													<button type="button" class="btn btn-default " id="replaceResetting">重置</button>
												</div>
											</div>
											<div style="margin-top: 5px;margin-left: 15px;width: 98%">
												<!-- 物料明细列表 -->
												<table id="materielTable" class="table dataTable table-hover pickDatails">
												</table>
											</div>
											<div style="width: 100%;">
												<div>
													<span style="padding-left: 17px;" class="requiredCss" >注：双击物料即可，完成物料替换。</span>
												</div>
												<!-- <div style="text-align: center;position: relative;">
													<button type="button" class="btn btn-default" id="print" style="margin-right: 20px;">打印</button>
													<button type="button" class="btn btn-default" id="confirm" style="margin-right: 20px;">确定</button>
													<button type="button" class="btn btn-default" id="cancel" data-dismiss="modal">取消</button>
												</div> -->
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
					<!-- 替换模态框 end -->
					
					<!-- 替换中双击模态框 start -->
					
					<div class="modal fade " id="replacedblModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
						<div class="modal-dialog" style="width: 530px; height: 220px;">
							<div class="modal-content" style="width: auto;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="titleModal">物料替换确认</h4>
								</div>
								<div class="modal-body" style="height: auto; padding: 10px;">
									<div style="text-align: center;">
										<div>
											<span class="modalSpan">物料代码：</span>
											<input type="text" id="replacedblfNumber"  class="clean-c form-control bj_color resetting modalInput"  readonly="readonly" />
										</div>
										<div style="margin: 10px;">
											<span class="modalSpan">物料名称：</span>
											<input type="text" id="replacedblfName" name="fWorkerName" class="clean-c form-control bj_color resetting modalInput" readonly="readonly" />
										</div>
										<div>
											<span class="modalSpan">规格型号：</span>
											<input type="text" id="replacedblfModel" name="fWorker" class="clean-c form-control bj_color resetting modalInput" readonly="readonly"/>
										</div>
										<div style="margin: 10px;" id="helpCode">
											<span class="modalSpan">助记码：</span>
											<input type="text" id="replacedblfHelpCode" name="fWorkerName" class="clean-c form-control bj_color resetting modalInput" readonly="readonly" />
										</div>
										<div>
											<span class="modalSpan">应发数：</span>
											<input type="text" id="yingdbl" name="fWorker" class="clean-cs form-control  resetting modalInput" autocomplete="off"  />
										</div>
										<div style="margin: 10px;">
											<span class="modalSpan">应发辅助数：</span>
											<input type="text" id="yingfudbl" name="fWorkerName" class="clean-cs form-control resetting modalInput" autocomplete="off" />
										</div>
										<div>
											<span class="modalSpan">单位用量：</span>
											<input type="text" id="yongdbl" name="fWorker" class="clean-cs form-control  resetting modalInput" autocomplete="off" />
										</div>
										<div style="margin: 10px;">
											<span class="modalSpan">换算率：</span>
											<input type="text" id="huandbl" name="fWorkerName" class="clean-cs form-control resetting modalInput" autocomplete="off" />
										</div>
										<div style="margin-top: 10px;">
											<button type="button" class="btn btn-default " id="replacedeblcomfirm">确定</button>
											<button type="button" class="btn btn-default " id="replacedblResetting">重置</button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>					
					<!-- 替换中双击模态框 end -->
					 <!--  检查人模态框 start -->
						<div class="modal fade " id="inputCardModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
						<div class="modal-dialog" style="width: 20%; height: 220px;">
							<div class="modal-content" style="width: auto;text-align:center;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="titleModal">部门和人员选择</h4>
								</div>
								<div class="modal-body" style="padding: 10px;">
										<form id="inForm" class="form-group">
										<div style="margin-right: 15px;" id="">
											<table border="0" cellspacing="0" cellpadding="0" class="table-condensed normal-table table-content" id="" style="width: 100%;">
												<tr>
													<td class="title" style="width:100px;text-align:left;"><span class="sub">部门：</span></td>
													<td >
													<div style="float:left;margin-right: 10px;">
														<select name="fWorkShopId" id="fWorkShopId" class="selectpicker clean-c " data-live-search="true" data-width="140px"  autocomplete="off"> 
														</select>
													</div>
													</td>
												</tr>
												<tr>
													<td class="title" style="text-align:left;"><span class="sub">操作人卡号：</span></td>
													<td colspan=""><input type="text" id="fWorkerssss" name="fWorker" class="clean_c form-control"  autocomplete="off"></td>
													
												</tr>
											</table>
											<div style="width: 100%;position:relative;">
												<div style="text-align: center;margin-top: 12px;">
													<button type="button" class="btn btn-default" id="checkconfirm" style="margin-right: 20px;">确定</button>
													<button type="button" class="btn btn-default" id="checkcancel" data-dismiss="modal">取消</button>
												</div>
											</div>
										</div>
									</form>
									</div>
								</div>
							</div>
						</div>
					<!-- 检查人模态框 end-->   
					
					
					
					<!--物料对比模态框 start -->
					<div class="modal fade " id="duibireplaceModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="background-color: rgba(0, 0, 0, 0.5)" data-backdrop="static">
						<div class="modal-dialog" style="width: 95%; height: 220px;">
							<div class="modal-content" style="width: auto;">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="">物料对比</h4>
								</div>
								<div class="modal-body" style="height: auto; padding: 10px;width: 100%;">
									<form id="replaceForm" class="form-group">
										<div style="display: inline-block;overflow: hidden;margin-right: 15px;width: 100%;" id="">
											<div style="margin-left: 15px;">
												<div style="float: left;margin-bottom: 5px;">
													<span class="spanCss">共用物料</span>  
												</div>
											</div>
											<div style="margin-top: 5px;margin-left: 15px;width: 98%;overflow:scroll;height:200px;">
												<!-- 共用物料列表 -->
												<table id="publicgailTable" class="table dataTable table-hover ">
												</table>
											</div>
											<div style="margin-left: 15px;">
												<div style="float: left;margin-bottom: 5px;">
													<span class="spanCss">退仓物料</span>  
												</div>
											</div>
											<div style="margin-top: 5px;margin-left: 15px;width: 98%;overflow:scroll;height:200px;">
												<!-- 退仓物料明细列表 -->
												<table id="tuigailTable" class="table dataTable table-hover " >
												</table>
											</div>
											<div style="width: 100%;margin-top:30px;">
												<div>
													<span style="padding-left: 17px;" class="requiredCss" >注：勾选的物料为改制需要物料,不退回仓库。</span>
												</div>
												<div style="text-align: center;position: relative;">
													<button type="button" class="btn btn-default" id="duigaiconfirm" style="margin-right: 20px;">提交数据</button>
													<button type="button" class="btn btn-default" id="duigaicancel" data-dismiss="modal">取消</button>
												</div>
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
					<!-- 物料对比模态框 end -->
					<div th:include="Production/showModal :: queryModal" /></div>
				</div>
			</div>
		</div>
	</div>
	<span id="value" style="display: none;">picking</span>
	<div th:include="base :: bottom" />
	<div th:include="base :: bootstrapTable" />
	<div th:include="base :: plugIn" />
	<div th:include="base :: bootstrapEditable" id="editalbe"/>
	<div th:include="base :: bootstrapTable-eidt" id="eidt"/>
	<div th:include="base :: others" />
	<script th:src="@{plugins/bootstrapEditable/js/bootstrap-table-editable.js}"></script>
    <div th:include="base :: ztree" />
	<script th:src="@{js/WareHouse/picking.js}"></script>
	<script th:src="@{js/Production/pickshowModal.js}"></script>
</body>
</html>
